package com.yunju.xuexin.xuexincrawler.messagequene;

import io.zbus.mq.Broker;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by 刘治军 on 2017/10/24.
 */
@Configuration
public class ZbusProducerConfig {
    @Bean(name = "producer")
    @Qualifier("producer")
    public io.zbus.mq.Broker producer(@Value("${zbus.broker.connectin}") String connection) {
        Broker broker = new Broker(connection);
        return broker;
    }
}
